/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package threadwork;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author J
 */
public class ThreadAux implements Runnable{
    private int contador;
    public ThreadAux(){
        contador = 0;
    }
    @Override
    public void run(){
        
            try {
                while(true){
                System.out.print(contador++);
                Thread.sleep(1000);
                } 
            }
            catch (InterruptedException ex) {
                Logger.getLogger(ThreadAux.class.getName()).log(Level.SEVERE, null, ex);
            }
    }
  }
